package com.pubinfo.passbook.engine.factory;

import com.pubinfo.passbook.engine.Computor;
import com.pubinfo.passbook.engine.constants.ComputeChainType;

/**
 * 计算器工厂
 * <p>
 * 根据参数来构建所有的计算单元
 * </p>
 */
public interface ComputorFactory<T, R extends Computor> {

    /**
     * 接收一个T参数来初始化计算器, targetChainType为目标计算链类型 {@link ComputeChainType}
     *
     * @param params
     * @return
     */
    R getComputor(T params, String targetChainType);
}
